<html><head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>ExamineRegularExpression()</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">ExamineRegularExpression()</font></b></p>
<p><b>语法</b></p><blockquote>
结果 = <font color="#3A3966"><b>ExamineRegularExpression</b></font>(#RegularExpression, String$)</blockquote>

</blockquote>
<b>概要</b><br><blockquote>

在给定的字符串 String$ 中匹配正则表达式 #RegularExpression. 单独的匹配可以使用函数 <a href="nextregularexpressionmatch.html">NextRegularExpressionMatch()</a> 进行迭代调用. 每个匹配, 匹配的字符串, 它的位置/长度和任何在匹配中的分组都可以通过适当的函数被提取出来. 

</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#RegularExpression</i></td>
<td width="90%"> 
要使用的正则表达式. 

</td></tr>
<tr><td><i>String$</i></td>
<td> 
要提交给正则表达式进行匹配的字符串. 

</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>

如果匹配启动成功则返回一个非零值. Whether an actual match was found can be determined by calling <a href="nextregularexpressionmatch.html">NextRegularExpressionMatch()</a>. 

</blockquote><p><b>示例</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <font color="#3A3966">; 这条表达式将匹配所有以小写字母开头, </font>
  <font color="#3A3966">; 同时以字母 'b' 连接然后以一个大写字母结束的三字母单词. 例如: abC</font>
  <font color="#3A3966">; Each match is printed with its position in the original string.</font>
  <font color="#3A3966">;    </font>
  <b><font color="#3A3966">If</font></b> <font color="#3A3966">CreateRegularExpression</font>(0, "[a-z]b[A-Z]")
    <b><font color="#3A3966">If</font></b> <font color="#3A3966">ExamineRegularExpression</font>(0, "abC ABc zbA abc")
      <b><font color="#3A3966">While</font></b> <font color="#3A3966">NextRegularExpressionMatch</font>(0)
        <b><font color="#3A3966">Debug</font></b> "Match: " +<font color="#3A3966"> RegularExpressionMatchString</font>(0)
        <b><font color="#3A3966">Debug</font></b> "    Position: " +<font color="#3A3966"> Str</font>(<font color="#3A3966">RegularExpressionMatchPosition</font>(0))
        <b><font color="#3A3966">Debug</font></b> "    Length: " +<font color="#3A3966"> Str</font>(<font color="#3A3966">RegularExpressionMatchLength</font>(0))
      <b><font color="#3A3966">Wend</font></b>
    <b><font color="#3A3966">EndIf</font></b>
  <b><font color="#3A3966">Else</font></b>
    <b><font color="#3A3966">Debug</font></b> <font color="#3A3966">RegularExpressionError</font>()
  <b><font color="#3A3966">EndIf</font></b>
</font></pre>

</blockquote><p><b>参阅</b></p><blockquote>

<a href="nextregularexpressionmatch.html">NextRegularExpressionMatch()</a>, 
<a href="regularexpressionmatchstring.html">RegularExpressionMatchString()</a>, <a href="regularexpressionmatchposition.html">RegularExpressionMatchPosition()</a>, <a href="regularexpressionmatchlength.html">RegularExpressionMatchLength()</a> 

</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center>&lt;- <a href=createregularexpression.html>CreateRegularExpression()</a> - <a href="index.html">RegularExpression Index</a> - <a href="extractregularexpression.html">ExtractRegularExpression()</a> -&gt;<br><br>

</body></html>